/*
 * SkipList.h
 *
 *  Created on: Jan 26, 2013
 *      Author: grebwerd
 */

#ifndef SKIPLIST_H_
#define SKIPLIST_H_

#include "Node.h"
#include <iostream>
#include <math.h>
#include "mtrand.h"

using namespace std;

class SkipList {

private:
	Node* head;
	Node* NIL;
	int size;
	int maxLevel;
	int maxHeadLevel;

public:
	SkipList();
	virtual ~SkipList();
	void displayList();
	void displayLevel(int level);
	void insert(int value);
	int getRandomLevel();
	void incrementMaxLevel();
	void checkMaxLevel();
	void updateHeadNode();
	void initializeHead();

};

#endif /* SKIPLIST_H_ */
